﻿using System;
using SilverQuery;
using SilverPortal;

namespace SilverPortal
{
	public class Logger : SilverQueryObject
	{
		internal Logger()
		{
		}

		public void Warn(string message)
		{
			Append(message, "warn");
		}

		public void Error(string message)
		{
			Append(message, "error");
		}

		public void Info(string message)
		{
			Append(message, "info");
		}

		public void Debug(string message)
		{
			Append(message, "debug");
		}

		private void Append(string message, string className)
		{
			@q("#debugConsole div.content").append(@q("<div/>").addClass(className).html(message));
		}
	}
}
